package com.industrial.app.controller;

import com.industrial.app.mapper.BizDictDataMapper;
import com.industrial.common.core.web.domain.AjaxResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/biz/app/dict")
public class AppDictDataController {

    @Autowired
    private BizDictDataMapper bizDictDataMapper;

    @GetMapping("/{dictCode}")
    public AjaxResult loadDictData(@PathVariable("dictCode") String dictCode){
        List<Map<String,String>> result = bizDictDataMapper.selectDcitData(dictCode);
        return AjaxResult.success(result);
    }
}
